home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / unicharutil / nsIUnicodeNormalizer.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  6KB  |  141 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsIUnicodeNormalizer.idl
  3.  */
  4.  
  5. #ifndef __gen_nsIUnicodeNormalizer_h__
  6. #define __gen_nsIUnicodeNormalizer_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. /* For IDL files that don't want to include root IDL files. */
  14. #ifndef NS_NO_VTABLE
  15. #define NS_NO_VTABLE
  16. #endif
  17. #define NS_UNICODE_NORMALIZER_CID { 0xa665e49a, 0xf3e6, 0x4fed, { 0x9f, 0x31, 0xf7, 0xc5, 0x68, 0xa2, 0x98, 0x99 } }
  18. #define NS_UNICODE_NORMALIZER_CONTRACTID "@mozilla.org/intl/unicodenormalizer;1"
  19.  
  20. /* starting interface:    nsIUnicodeNormalizer */
  21. #define NS_IUNICODENORMALIZER_IID_STR "b43a461f-1bcf-4329-820b-66e48c979e14"
  22.  
  23. #define NS_IUNICODENORMALIZER_IID \
  24.   {0xb43a461f, 0x1bcf, 0x4329, \
  25.     { 0x82, 0x0b, 0x66, 0xe4, 0x8c, 0x97, 0x9e, 0x14 }}
  26.  
  27. class NS_NO_VTABLE nsIUnicodeNormalizer : public nsISupports {
  28.  public: 
  29.  
  30.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_IUNICODENORMALIZER_IID)
  31.  
  32.   /**
  33.  * Normalize Unicode (NFD, NFC, NFKD, NFKC).
  34.  *
  35.  * NFD: Canonical Decomposition
  36.  * NFC: Canonical Decomposition, followed by Canonical Composition
  37.  * NFKD: Compatibility Decomposition
  38.  * NFKC: Compatibility Decomposition, followed by Canonical Composition
  39.  * Reference: Unicode Standard, TR15, Unicode Normalization Forms
  40.  *
  41.  * @param aSrc         [IN]  nsAString which contains an input UTF-16 string.
  42.  * @param aDest        [OUT] A pointer to an output buffer provided by a callee.
  43.  * @return             NS_OK for success, 
  44.  */
  45.   /* void NormalizeUnicodeNFD (in AString aSrc, out AString aDest); */
  46.   NS_IMETHOD NormalizeUnicodeNFD(const nsAString & aSrc, nsAString & aDest) = 0;
  47.  
  48.   /* void NormalizeUnicodeNFC (in AString aSrc, out AString aDest); */
  49.   NS_IMETHOD NormalizeUnicodeNFC(const nsAString & aSrc, nsAString & aDest) = 0;
  50.  
  51.   /* void NormalizeUnicodeNFKD (in AString aSrc, out AString aDest); */
  52.   NS_IMETHOD NormalizeUnicodeNFKD(const nsAString & aSrc, nsAString & aDest) = 0;
  53.  
  54.   /* void NormalizeUnicodeNFKC (in AString aSrc, out AString aDest); */
  55.   NS_IMETHOD NormalizeUnicodeNFKC(const nsAString & aSrc, nsAString & aDest) = 0;
  56.  
  57. };
  58.  
  59. /* Use this macro when declaring classes that implement this interface. */
  60. #define NS_DECL_NSIUNICODENORMALIZER \
  61.   NS_IMETHOD NormalizeUnicodeNFD(const nsAString & aSrc, nsAString & aDest); \
  62.   NS_IMETHOD NormalizeUnicodeNFC(const nsAString & aSrc, nsAString & aDest); \
  63.   NS_IMETHOD NormalizeUnicodeNFKD(const nsAString & aSrc, nsAString & aDest); \
  64.   NS_IMETHOD NormalizeUnicodeNFKC(const nsAString & aSrc, nsAString & aDest); 
  65.  
  66. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  67. #define NS_FORWARD_NSIUNICODENORMALIZER(_to) \
  68.   NS_IMETHOD NormalizeUnicodeNFD(const nsAString & aSrc, nsAString & aDest) { return _to NormalizeUnicodeNFD(aSrc, aDest); } \
  69.   NS_IMETHOD NormalizeUnicodeNFC(const nsAString & aSrc, nsAString & aDest) { return _to NormalizeUnicodeNFC(aSrc, aDest); } \
  70.   NS_IMETHOD NormalizeUnicodeNFKD(const nsAString & aSrc, nsAString & aDest) { return _to NormalizeUnicodeNFKD(aSrc, aDest); } \
  71.   NS_IMETHOD NormalizeUnicodeNFKC(const nsAString & aSrc, nsAString & aDest) { return _to NormalizeUnicodeNFKC(aSrc, aDest); } 
  72.  
  73. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  74. #define NS_FORWARD_SAFE_NSIUNICODENORMALIZER(_to) \
  75.   NS_IMETHOD NormalizeUnicodeNFD(const nsAString & aSrc, nsAString & aDest) { return !_to ? NS_ERROR_NULL_POINTER : _to->NormalizeUnicodeNFD(aSrc, aDest); } \
  76.   NS_IMETHOD NormalizeUnicodeNFC(const nsAString & aSrc, nsAString & aDest) { return !_to ? NS_ERROR_NULL_POINTER : _to->NormalizeUnicodeNFC(aSrc, aDest); } \
  77.   NS_IMETHOD NormalizeUnicodeNFKD(const nsAString & aSrc, nsAString & aDest) { return !_to ? NS_ERROR_NULL_POINTER : _to->NormalizeUnicodeNFKD(aSrc, aDest); } \
  78.   NS_IMETHOD NormalizeUnicodeNFKC(const nsAString & aSrc, nsAString & aDest) { return !_to ? NS_ERROR_NULL_POINTER : _to->NormalizeUnicodeNFKC(aSrc, aDest); } 
  79.  
  80. #if 0
  81. /* Use the code below as a template for the implementation class for this interface. */
  82.  
  83. /* Header file */
  84. class nsUnicodeNormalizer : public nsIUnicodeNormalizer
  85. {
  86. public:
  87.   NS_DECL_ISUPPORTS
  88.   NS_DECL_NSIUNICODENORMALIZER
  89.  
  90.   nsUnicodeNormalizer();
  91.  
  92. private:
  93.   ~nsUnicodeNormalizer();
  94.  
  95. protected:
  96.   /* additional members */
  97. };
  98.  
  99. /* Implementation file */
  100. NS_IMPL_ISUPPORTS1(nsUnicodeNormalizer, nsIUnicodeNormalizer)
  101.  
  102. nsUnicodeNormalizer::nsUnicodeNormalizer()
  103. {
  104.   /* member initializers and constructor code */
  105. }
  106.  
  107. nsUnicodeNormalizer::~nsUnicodeNormalizer()
  108. {
  109.   /* destructor code */
  110. }
  111.  
  112. /* void NormalizeUnicodeNFD (in AString aSrc, out AString aDest); */
  113. NS_IMETHODIMP nsUnicodeNormalizer::NormalizeUnicodeNFD(const nsAString & aSrc, nsAString & aDest)
  114. {
  115.     return NS_ERROR_NOT_IMPLEMENTED;
  116. }
  117.  
  118. /* void NormalizeUnicodeNFC (in AString aSrc, out AString aDest); */
  119. NS_IMETHODIMP nsUnicodeNormalizer::NormalizeUnicodeNFC(const nsAString & aSrc, nsAString & aDest)
  120. {
  121.     return NS_ERROR_NOT_IMPLEMENTED;
  122. }
  123.  
  124. /* void NormalizeUnicodeNFKD (in AString aSrc, out AString aDest); */
  125. NS_IMETHODIMP nsUnicodeNormalizer::NormalizeUnicodeNFKD(const nsAString & aSrc, nsAString & aDest)
  126. {
  127.     return NS_ERROR_NOT_IMPLEMENTED;
  128. }
  129.  
  130. /* void NormalizeUnicodeNFKC (in AString aSrc, out AString aDest); */
  131. NS_IMETHODIMP nsUnicodeNormalizer::NormalizeUnicodeNFKC(const nsAString & aSrc, nsAString & aDest)
  132. {
  133.     return NS_ERROR_NOT_IMPLEMENTED;
  134. }
  135.  
  136. /* End of implementation class template. */
  137. #endif
  138.  
  139.  
  140. #endif /* __gen_nsIUnicodeNormalizer_h__ */
  141.